
from .api_update import ApiUpdate

from flask import Flask, request, Blueprint

from . import app_update

@app_update.route('/update_need', methods=['GET', 'PUT'])
    
def update_need():

    methods = request.method

    info = request.form

    company_id = info.get('company_id')

    need = info.get('need')

    openid = info.get('openid')

    party = info.get('party')

    with ApiUpdate() as conn_api:

        result_info = conn_api.update_company_need(methods, company_id, need, party, openid)

    return result_info
